<template>
    <div class="social-page">

        <div v-for="(item,index) in list" :key="index" class="box unified-cursor-default flex unified-flex-align unified-flex-space-between">
            <i class="icon mobile" :class="item.icon"></i>
            <div class="Indicate flex unified-flex-center unified-flex-align">
                <span>{{item.title}}<span class="status ">{{item.status}}</span> </span>
                <span>{{item.tips}}</span>
            </div>

            <div>
                <el-button type="primary" round @click="clickList(index)">{{item.btn_text}}</el-button>
            </div>

        </div>
    </div>
</template>

<script>
    import {
        mapState
    } from 'vuex'
    export default {
        computed: {
            ...mapState(['loginUserInfo'])
        },

        data() {

            return {
                
                list:[
                    {
                        icon:"el-icon-phone",
                        title:"邮箱 Email",
                        tips:"可用于找回密码辅助",
                        status:"未绑定",
                        btn_text:"点击绑定",
                        btn_dis:false  ,            // 右边按钮禁止状态
                        path:"bind/email"                     // 点击右边按钮跳转地址
                    },
                    {
                        icon:"el-icon-phone",
                        title:"微信 Wechat",
                        tips:"可用于找回密码辅助",
                        status:"未绑定",
                        btn_text:"点击绑定",
                        btn_dis:false  ,            // 右边按钮禁止状态
                        path:"bind/wechat"                     // 点击右边按钮跳转地址
                    },
                    {
                        icon:"el-icon-phone",           // 图表
                        title:"手机 Mobile",          // 标题
                        tips:"可用于找回密码辅助",      // 提示文本
                        status:"未绑定",           // 蓝色文本
                        btn_text:"点击绑定",        // 右边按钮文本
                        btn_dis:false  ,            // 右边按钮禁止状态
                        path:"bind/mobile"                     // 点击右边按钮跳转地址
                    }
                    
                ],
            }
        },
        methods: {
            clickList(index){
                console.log(this.list[index].path);
                this.$router.push(this.list[index].path)
            }
        }

    }
</script>

<style scoped="scoped">
    .social-page {
        width: 100%;
        height: 100%;
        position: relative;
        padding-top: 35px;
        box-sizing: border-box;
    }

    .box {
        padding: 0px 25px;
        box-sizing: border-box;
        width: 90%;
        margin: 0px auto;
        margin-bottom: 25px;
        height: 105px;
        border: 1px solid #c3c3c344;
        border-radius: 15px;
    }



    .Indicate {
        flex: 1;
        height: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .Indicate span:nth-child(2) {
        font-size: 12px;
        color: #555555;
        margin-top: 8px;
    }

    .icon {
        font-size: 30px;
        color: #C3C3C3;
        margin-right: 20px;
    }

    .email,
    .mobile {
        color: #2269F3;
    }

    .status {
        margin-left: 10px;
        font-size: 8px;
        text-decoration: underline;
        color: #2269F3;
    }

    .bindWechat,
    .bindEmail,
    .bindMobile {
        position: absolute;
        width: 100%;
        height: 100%;
        background-color: #33333344;
        top: 0px;
        left: 0;
    }

    .content {
        width: 80%;
        height: 80%;
        background-color: #fff;
        z-index: 10;
        border-radius: 10px;
    }

    .header {
        width: 100%;
        height: 60px;
        border-bottom: 1px solid #C3C3C344;
        line-height: 60px;
        letter-spacing: 1px;
        padding: 0px 15px;
        box-sizing: border-box;
    }


    .inputMobile {
        flex-direction: column;
    }
</style>
